﻿namespace EyeOpen.MappingGenerator.Windows
{
    using System.Linq;
    using System.Windows.Forms;
    using System.CodeDom.Compiler;
    using System.ComponentModel;

    internal partial class CompilerErrorsForm : Form
    {
        public CompilerErrorsForm(CompilerErrorCollection compilerErrors)
        {
            this.InitializeComponent();
            if (compilerErrors == null) 
            {
                return;
            }

            this.compilerErrorsDataGridView.DataSource = new BindingList<CompilerError>(
                compilerErrors.Cast<CompilerError>()
                .ToList());
        }
    }
}
